<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="../../../common/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<jsp:include page="../../../common/head.jsp">
			 <jsp:param name="_spPage" value="true"/>
			 <jsp:param name="_useUpload" value="true"/>
		</jsp:include>		
		<title>公共信息发布</title>
	<script type="text/javascript">
	function addInfo(){
		window.location.href="add_info_publish.jsp?infoTypeL2=${infoPublish.infoTypeL2}&infoType=${infoPublish.infoType}";
	}	
	function delInfo(){
	    var delIds = xjCommon.getValueStr("ids",",");
	    if(delIds.length==0)
	    {
	    	alert("请选择要删除的信息！");
	    	return;
	    }
		if(confirm("确认删除所选信息？")){
			var returnValue = ModalWindow("jump.do?path=deleteInfoPublish.do&ids="+delIds,900,700);
			xjSpPage.spPageSubmit();
		}
	}	
	function editInfo(varid,mainId){
		window.location.href="updateInfoPublish.do?infoId="+varid+"&queryInfoType=${infoPublish.infoType}";
	}
	function viewInfo(varid){
		ModelWindow("jump.do?path=manage~public_info~detailPublishInfo@detailCommon.do&beanName=infoPublish&idValue="+varid,800,600);		
	}
	</script>
	</head>
	<body>
		<form action="listInfoPublish.do" name="infoForm" id="infoForm" method="post">
		<!--所属大类编码-->
		<input type="hidden" name="infoPublish.infoTypeL2" value="${infoPublish.infoTypeL2}"/>
		<input type="hidden" name="infoPublish.infoType" value="${infoPublish.infoType}"/>
	<div id="body_div">
	<w:ShowTitle name="${wfn:getCodeName(CodeDict,pageTitle)}">
		<img src="../../../images/main/query.png" width="20" height="25" /><a href="#" onclick="_queryDivBg(this)">查询</a>
		<img src="../../../images/main/add.png" width="20" height="25" /><a href="#" onclick="addInfo()">添加</a>
		<img src="../../../images/main/delete.png" width="20" height="25" /><a href="#" onclick="delInfo()">删除</a>
	</w:ShowTitle>
	<div id="body_content">
		<div id="queryDiv">
		<table width="100%">
			<tr>
				<th height="24" colspan="4">
					<w:CodeDictOut value="${infoPublish.infoType}"></w:CodeDictOut>
				</th>
			</tr>
					<tr>
						<td width="15%">
							标&nbsp;&nbsp;&nbsp;&nbsp;题
						</td>
						<td width="35%" class="left_align">
							<input type="text" name="infoPublish.infoTitle" value="${infoPublish.infoTitle}"/>
						</td>
					</tr>
					<tr>
						<td width="15%" align="right">
							发布时间
						</td>
						<td width="35%" class="left_align">
								<input type="text" name="dateFrom" value="${dateFrom}" onFocus="new WdatePicker()" readOnly="readOnly" class="inputCal"/>
							至
							<input type="text" name="dateTo" value="${dateTo}" onFocus="new WdatePicker()" readOnly="readOnly" class="inputCal"/>
						</td>
					</tr>
				<tr>
					<td colspan="4">
						<input name="button" type="submit" class="btn_standard" value="　查 询　" />
						<input name="button" type="button" class="btn_standard" onclick="_cancelQuery()" value="取消" />
					</td>
				</tr>
			</table>
			</div>
			<table width="100%">
				<tr>
					<td width="40" class="td_title">
						<div onclick="xjCommon.checkAll('ids')" style="cursor:pointer;">全选</div>
					</td>
					<td class="td_title">标题</td>
					<td width="80" class="td_title">录入人</td>
					<td width="80" class="td_title">发布时间</td>
					<td width="70" class="td_title">发布状态</td>
					<td width="160" class="td_title">操作</td>
				</tr>
				<c:forEach items="${datalist}" var="obj">
					<tr>
						<td><input type="checkbox" name="ids" value="${obj.infoId}"/></td>
						<td class="left_align"><w:dataOut fieldName="" dataValue="${obj.infoTitle}" length="50" /></td>
						<td class="td_text_align td_nowrap">${obj.publishUserName}</td>
						<td><fmt:formatDate value="${obj.publishTime}" pattern="yyyy-MM-dd"/></td>
						<td class="td_text_align td_nowrap">
							<c:if test="${obj.publishState == 'Y'}">是</c:if>
							<c:if test="${obj.publishState == 'N'}">否</c:if>
						</td>
						<td class="td_text_align td_nowrap">
							<a href="#" onClick="editInfo('${obj.infoId}')">编辑</a>
							<a href="#" onClick="downLoadFile('infoPublish','${obj.infoId}',this)">下载</a>
<!-- 						<a href="${ctx}/jsp/manage/info_publish/detailInfoPublish.do?infoId=${obj.infoId}" target="_blank">查看</a> -->
						</td>
					</tr>
				</c:forEach>
			</table>
			<w:spPage />
			</div>
		</div>
		</form>
	</body>
</html>